import Component from "react";
import React from "react";
import {PageHeader, Button} from "antd";

export default class Control extends React.Component {

    //重新开始
    reStart() {
        this.props.reStart();
    }
    //悔棋
    unDo(){
        this.props.unDo();
    }


    render() {
        return (
            <div>
                <PageHeader
                    ghost={false}
                    title="五子棋"
                    subTitle="这是一个react的五子棋项目"
                    extra={[
                        <Button key="2" onClick={this.unDo.bind(this)}>悔棋</Button>,
                        <Button key="1" type="primary" onClick={this.reStart.bind(this)}>重新开始</Button>,]}>
                </PageHeader>
            </div>
        )
    }

}